//
//  WB_MessageManager.h
//  GhStaff
//
//  Created by mini3 on 2017/12/7.
//  Copyright © 2017年 GhStaff. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CommonCrypto/CommonDigest.h>
#import "WB_HttpManager.h"

///请求结果回调
typedef void(^WBRequestResultBlock)(NSString* code, NSString* message, id data);
///缓存结果回调
typedef void(^WBCacheResultBlock)(id data);
///上传进度回调
typedef void(^WBUploadProgressBlock)(CGFloat total, CGFloat current);
///检测更新回调
typedef void(^WBCheckAppVersonBlock)(BOOL isUpdate, id updateInfo);

///请求数据类型
typedef NS_ENUM(NSInteger, WBRequsetType){
    WBRequsetTypeOfNormal = 1,    // 普通
    WBRequsetTypeOfCache,         // 缓存
    WBRequsetTypeOfImage,         // 带图片
    WBRequsetTypeOfImageArray     // 多张图片
};

@interface WB_MessageManager : NSObject

///登录viewController
@property(nonatomic, strong) Hen_BaseLoginViewController *loginVc;
///是否到登录
@property(nonatomic, assign) BOOL isToLogin;


+ (WB_MessageManager *)shareMessageManager;

/// 请求数据 POST
- (NSString*)requestPostWithAction:(NSString *)action
                   dictionaryParam:(NSDictionary *)param
                   withResultBlock:(WBRequestResultBlock)resultBlock;

/// 请求数据 登录 注册  POST
- (NSString*)requestPostLoginRegWithAction:(NSString *)action
                           dictionaryParam:(NSDictionary *)param
                           withResultBlock:(WBRequestResultBlock)resultBlock;
/// 重置手机登录密码 PATCH
- (NSString*)requestPatchResetPwdWithAction:(NSString *)action
                            dictionaryParam:(NSDictionary *)param
                            withResultBlock:(WBRequestResultBlock)resultBlock;
/// 请求数据 GET
- (NSString *)requestGetWithAction:(NSString *)action
                   dictionaryParam:(NSDictionary *)param
                   withResultBlock:(WBRequestResultBlock)resultBlock;

///请求活动数据  GET
//- (NSString *)requestActivityGetWithAction:(NSString *)action
//                           dictionaryParam:(NSDictionary *)param
//                           withResultBlock:(WBRequestResultBlock)resultBlock;


///添加不提示网络错误请求
-(void)addUnNoticeNetworkErrorRequestId:(NSString*)requestId;

///添加不跳转登录请求
-(void)addUnToLoginRequestId:(NSString*)requestId;

///重新请求
-(void)reRequst;

@end
